# -*- encoding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 5
_modified_time = 1286335353.3164971
_template_filename='/Users/joeldunham/old/onlinelinguisticdatabase/templates/derived/form/history.html'
_template_uri='/derived/form/history.html'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
from webhelpers.html import escape
_exports = ['heading']


def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
    # SOURCE LINE 3
    ns = runtime.Namespace(u'formViews', context._clean_inheritance_tokens(), templateuri=u'/base/formViews.html', callables=None, calling_uri=_template_uri, module=None)
    context.namespaces[(__name__, u'formViews')] = ns

def _mako_inherit(template, context):
    _mako_generate_namespaces(context)
    return runtime._inherit_from(context, u'/base/index.html', _template_uri)
def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        _import_ns = {}
        _mako_get_namespace(context, u'formViews')._populate(_import_ns, [u'*'])
        c = _import_ns.get('c', context.get('c', UNDEFINED))
        formViews = _mako_get_namespace(context, 'formViews')
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\n\n')
        # SOURCE LINE 3
        __M_writer(u'\n\n')
        # SOURCE LINE 7
        __M_writer(u'\n\n<div class="tableSpacerDivHalf"></div>\n<h2>Current Version</h2>\n<div class="tableSpacerDivHalf"></div>\n\n\n\n')
        # SOURCE LINE 15
        __M_writer(escape(formViews.formViewLong(c.form)))
        __M_writer(u'\n\n<h2>Previous Versions</h2>\n<div class="tableSpacerDivHalf"></div>\n')
        # SOURCE LINE 19
        for formBackup in c.formBackups:
            # SOURCE LINE 20
            __M_writer(u'    ')
            formBackup.fromJSON() 
            
            __M_writer(u'\n    <span class="datetimeHeader">')
            # SOURCE LINE 21
            __M_writer(escape(formBackup.datetimeModified.strftime('%b %d, %Y at %I:%M %p')))
            __M_writer(u' by ')
            __M_writer(escape(formBackup.backuper.firstName))
            __M_writer(u' ')
            __M_writer(escape(formBackup.backuper.lastName))
            __M_writer(u'</span>\n    <div class="historyDiv">\n    ')
            # SOURCE LINE 23
            __M_writer(escape(formViews.formViewForHistory(formBackup)))
            __M_writer(u'\n    </div>\n')
            pass
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_heading(context):
    context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, u'formViews')._populate(_import_ns, [u'*'])
        c = _import_ns.get('c', context.get('c', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 5
        __M_writer(u'\n    <h1 class="heading">History of Form ')
        # SOURCE LINE 6
        __M_writer(escape(c.form.id))
        __M_writer(u'</h1>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


